package com.alibaba.algo.apiimpl.user;

import com.alibaba.algo.dao.user.SysEmployeePositionMapper;
import com.alibaba.algo.domain.user.SysEmployeePositionDomain;
import com.alibaba.algo.entity.user.SysEmployeePosition;
import com.alibaba.algo.cooperation.usercomponent.service.user.SysEmployeePositionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 类SysEmployeePositionServiceImpl.java的实现描述：员工和岗位关系 serviceimpl
 *
 * @author nieganggang 2021-03-12 16:08:17
*/
@Slf4j
@RestController
public class SysEmployeePositionServiceImpl implements SysEmployeePositionService {

    @Autowired
    private SysEmployeePositionDomain sysEmployeePositionDomain;

    @Resource
    private SysEmployeePositionMapper sysEmployeePositionMapper;

    @Override
    public void insert(Long employeeId, Long positionId) {
        SysEmployeePosition sysEmployeePosition = new SysEmployeePosition();
        sysEmployeePosition.setEmployeeId(employeeId);
        sysEmployeePosition.setPositionId(positionId);
        sysEmployeePositionDomain.insert(sysEmployeePosition);
    }
}
